package com.zmx.base.entity;

import com.zmx.common.common.entitys.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author zhaomxr
 * null
 */
@Data
@Entity
@Table(name = "base_member_community_relation")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper=true)
@Inheritance(strategy = InheritanceType.JOINED)
public class BaseMemberCommunityRelation extends BaseEntity {

	/**
	 * 用户id
	 */
	@Column(name = "member_id")
	private Long memberId;

	/**
	 * 所选区域id
	 */
	@Column(name = "community_id")
	private Long communityId;

	/**
	 * 是否生效
	 */
	@Column(name = "is_valid")
	private Integer isValid;
}
